package com.zhiche.lisa.bms.dao.model.prepay;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 预付账单
 * </p>
 *
 * @author zhangkun
 * @since 2018-09-21
 */
@TableName("lisa_prepay_bill")
public class PrepayBill extends Model<PrepayBill> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     *  对应账款id
     */
	@TableField("head_id")
	private Long headId;
    /**
     * 订单号
     */
	@TableField("order_code")
	private String orderCode;
    /**
     * 订单号明细id
     */
	@TableField("order_dtl_id")
	private Integer orderDtlId;
    /**
     * OTM运单号
     */
	@TableField("waybill_id")
	private String waybillId;
    /**
     * OTM运单号明细
     */
	@TableField("waybill_dtl_id")
	private String waybillDtlId;
	/**
	 * 客户运单号
	 */
	@TableField("cus_waybill")
	private String cusWaybill;
    /**
     * 费用类型ID
     */
	@TableField("type_id")
	private Long typeId;
    /**
     * 费用名称( 保留同步过来的原始费用 )
     */
	@TableField("type_name")
	private String typeName;
    /**
     * 运输方式
     */
	@TableField("trans_model")
	private String transModel;
    /**
     * 车型编码
     */
	@TableField("vehicle_type_code")
	private String vehicleTypeCode;
    /**
     * 车型名称
     */
	@TableField("vehicle_type_name")
	private String vehicleTypeName;
    /**
     * 车队id
     */
	@TableField("fleet_id")
	@JsonSerialize(using= ToStringSerializer.class)
	private Long fleetId;
    /**
     * 车队名称
     */
	@TableField("fleet_name")
	private String fleetName;
    /**
     * 承运商id
     */
	@TableField("lsp_id")
	private Long lspId;
    /**
     * 承运商名称
     */
	@TableField("lsp_name")
	private String lspName;
    /**
     * 车架/车牌号
     */
	private String vin;
    /**
     * 司机id
     */
	@TableField("driver_id")
	private Long driverId;
    /**
     * 银行流水号
     */
	@TableField("bank_serial_num")
	private String bankSerialNum;
    /**
     * 司机名称
     */
	@TableField("driver_name")
	private String driverName;
    /**
     * 起运地名称
     */
	@TableField("start_addr")
	private String startAddr;
    /**
     * 起运地编码
     */
	@TableField("start_addr_code")
	private String startAddrCode;
    /**
     * 目的地
     */
	@TableField("end_addr")
	private String endAddr;
    /**
     * 目的地编码
     */
	@TableField("end_addr_code")
	private String endAddrCode;
    /**
     * 合同类型
     */
	@TableField("contract_type")
	private String contractType;
    /**
     * 合同编码
     */
	@TableField("contract_code")
	private String contractCode;
    /**
     * 付款方ID
     */
	@TableField("payer_id")
	@JsonSerialize(using= ToStringSerializer.class)
	private Long payerId;
    /**
     * 付款方名称
     */
	@TableField("payer_name")
	private String payerName;
    /**
     * 收款方ID
     */
	@TableField("payee_id")
	@JsonSerialize(using= ToStringSerializer.class)
	private Long payeeId;
    /**
     * 收款方名称
     */
	@TableField("payee_name")
	private String payeeName;
    /**
     * 预估单价
     */
	@TableField("est_price")
	private BigDecimal estPrice;
    /**
     * 单价
     */
	@TableField("actual_price")
	private BigDecimal actualPrice;
    /**
     * 公里数
     */
	private BigDecimal kilometre;
    /**
     * 数量
     */
	private Integer num;
    /**
     * 预估金额
     */
	@TableField("est_amt")
	private BigDecimal estAmt;
    /**
     * 结算金额(总金额)
     */
	@TableField("actual_amt")
	private BigDecimal actualAmt;
	/**
	 * 当前市场油价
	 */
	@TableField("current_oil_price")
	private BigDecimal currentOilPrice;

	/**
	 * 计算油价的有效期
	 */
	@TableField("current_effect_date")
	private Date currentEffectDate;
    /**
     * 租户ID
     */
	@TableField("tenant_id")
	private Long tenantId;
    /**
     * 下单时间
     */
	@TableField("order_date")
	private Date orderDate;
    /**
     * 回单时间
     */
	@TableField("receipt_date")
	private Date receiptDate;
    /**
     * 运单单状态：10-已发运、20-已回单、30-已运抵
     */
	@TableField("load_status")
	private String loadStatus;
    /**
     * 状态：10-新增、20-审核、30-确认
     */
	private Integer status;
	/**
	 * 同步状态：0-未审核、10-审核成功、20-审核驳回、30-转账失败
	 */
	@TableField("sync_status")
	private String syncStatus;
    /**
     * 现金预付
     */
	@TableField("prepay_cash")
	private BigDecimal prepayCash;
    /**
     * 油费预付
     */
	@TableField("prepay_oil")
	private BigDecimal prepayOil;
    /**
     * 预付方式; 0-油卡, 1-现金
     */
	@TableField("prepay_type")
	private Integer prepayType;
    /**
     * 预付总额
     */
	@TableField("prepay_sum")
	private BigDecimal prepaySum;
    /**
     * 余额
     */
	@TableField("balance")
	private BigDecimal balance;
    /**
     * 加油站油价
     */
	@TableField("pertrol_oil_price")
	private BigDecimal pertrolOilPrice;
	/**
	 * 确认加油状态; 0-未确认, 1-已确认
	 */
	@TableField("pertrol_oil_status")
	private Integer pertrolOilStatus;
	/**
	 * 确认加油时间
	 */
	@TableField("pertrol_oil_date")
	private Date pertrolOilDate;
    /**
     * 修改时间
     */
	@TableField("gmt_modify")
	private Date gmtModify;
    /**
     * 创建时间
     */
	@TableField("gmt_create")
	private Date gmtCreate;
    /**
     * 创建人
     */
	private Long creator;
    /**
     * 拥有人
     */
	private Long proprietor;
    /**
     * 关联费用id
     */
	@TableField("cost_id")
	private String costId;
    /**
     * 支付状态：0、未支付1、已支付 (是否创建支付申请)
     */
	@TableField("pay_state")
	private Integer payState;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getHeadId() {
		return headId;
	}

	public void setHeadId(Long headId) {
		this.headId = headId;
	}

	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	public Integer getOrderDtlId() {
		return orderDtlId;
	}

	public void setOrderDtlId(Integer orderDtlId) {
		this.orderDtlId = orderDtlId;
	}

	public String getWaybillId() {
		return waybillId;
	}

	public void setWaybillId(String waybillId) {
		this.waybillId = waybillId;
	}

	public String getWaybillDtlId() {
		return waybillDtlId;
	}

	public void setWaybillDtlId(String waybillDtlId) {
		this.waybillDtlId = waybillDtlId;
	}

	public String getCusWaybill() {
		return cusWaybill;
	}

	public void setCusWaybill(String cusWaybill) {
		this.cusWaybill = cusWaybill;
	}

	public Long getTypeId() {
		return typeId;
	}

	public void setTypeId(Long typeId) {
		this.typeId = typeId;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getTransModel() {
		return transModel;
	}

	public void setTransModel(String transModel) {
		this.transModel = transModel;
	}

	public String getVehicleTypeCode() {
		return vehicleTypeCode;
	}

	public void setVehicleTypeCode(String vehicleTypeCode) {
		this.vehicleTypeCode = vehicleTypeCode;
	}

	public String getVehicleTypeName() {
		return vehicleTypeName;
	}

	public void setVehicleTypeName(String vehicleTypeName) {
		this.vehicleTypeName = vehicleTypeName;
	}

	public Long getFleetId() {
		return fleetId;
	}

	public void setFleetId(Long fleetId) {
		this.fleetId = fleetId;
	}

	public String getFleetName() {
		return fleetName;
	}

	public void setFleetName(String fleetName) {
		this.fleetName = fleetName;
	}

	public Long getLspId() {
		return lspId;
	}

	public void setLspId(Long lspId) {
		this.lspId = lspId;
	}

	public String getLspName() {
		return lspName;
	}

	public void setLspName(String lspName) {
		this.lspName = lspName;
	}

	public String getVin() {
		return vin;
	}

	public void setVin(String vin) {
		this.vin = vin;
	}

	public Long getDriverId() {
		return driverId;
	}

	public void setDriverId(Long driverId) {
		this.driverId = driverId;
	}

	public String getBankSerialNum() {
		return bankSerialNum;
	}

	public void setBankSerialNum(String bankSerialNum) {
		this.bankSerialNum = bankSerialNum;
	}

	public String getDriverName() {
		return driverName;
	}

	public void setDriverName(String driverName) {
		this.driverName = driverName;
	}

	public String getStartAddr() {
		return startAddr;
	}

	public void setStartAddr(String startAddr) {
		this.startAddr = startAddr;
	}

	public String getStartAddrCode() {
		return startAddrCode;
	}

	public void setStartAddrCode(String startAddrCode) {
		this.startAddrCode = startAddrCode;
	}

	public String getEndAddr() {
		return endAddr;
	}

	public void setEndAddr(String endAddr) {
		this.endAddr = endAddr;
	}

	public String getEndAddrCode() {
		return endAddrCode;
	}

	public void setEndAddrCode(String endAddrCode) {
		this.endAddrCode = endAddrCode;
	}

	public String getContractType() {
		return contractType;
	}

	public void setContractType(String contractType) {
		this.contractType = contractType;
	}

	public String getContractCode() {
		return contractCode;
	}

	public void setContractCode(String contractCode) {
		this.contractCode = contractCode;
	}

	public Long getPayerId() {
		return payerId;
	}

	public void setPayerId(Long payerId) {
		this.payerId = payerId;
	}

	public String getPayerName() {
		return payerName;
	}

	public void setPayerName(String payerName) {
		this.payerName = payerName;
	}

	public Long getPayeeId() {
		return payeeId;
	}

	public void setPayeeId(Long payeeId) {
		this.payeeId = payeeId;
	}

	public String getPayeeName() {
		return payeeName;
	}

	public void setPayeeName(String payeeName) {
		this.payeeName = payeeName;
	}

	public BigDecimal getEstPrice() {
		return estPrice;
	}

	public void setEstPrice(BigDecimal estPrice) {
		this.estPrice = estPrice;
	}

	public BigDecimal getActualPrice() {
		return actualPrice;
	}

	public void setActualPrice(BigDecimal actualPrice) {
		this.actualPrice = actualPrice;
	}

	public BigDecimal getKilometre() {
		return kilometre;
	}

	public void setKilometre(BigDecimal kilometre) {
		this.kilometre = kilometre;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public BigDecimal getEstAmt() {
		return estAmt;
	}

	public void setEstAmt(BigDecimal estAmt) {
		this.estAmt = estAmt;
	}

	public BigDecimal getActualAmt() {
		return actualAmt;
	}

	public void setActualAmt(BigDecimal actualAmt) {
		this.actualAmt = actualAmt;
	}

	public BigDecimal getCurrentOilPrice() {
		return currentOilPrice;
	}

	public void setCurrentOilPrice(BigDecimal currentOilPrice) {
		this.currentOilPrice = currentOilPrice;
	}

	public Date getCurrentEffectDate() {
		return currentEffectDate;
	}

	public void setCurrentEffectDate(Date currentEffectDate) {
		this.currentEffectDate = currentEffectDate;
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	public Date getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}

	public Date getReceiptDate() {
		return receiptDate;
	}

	public void setReceiptDate(Date receiptDate) {
		this.receiptDate = receiptDate;
	}

	public String getLoadStatus() {
		return loadStatus;
	}

	public void setLoadStatus(String loadStatus) {
		this.loadStatus = loadStatus;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getSyncStatus() {
		return syncStatus;
	}

	public void setSyncStatus(String syncStatus) {
		this.syncStatus = syncStatus;
	}

	public BigDecimal getPrepayCash() {
		return prepayCash;
	}

	public void setPrepayCash(BigDecimal prepayCash) {
		this.prepayCash = prepayCash;
	}

	public BigDecimal getPrepayOil() {
		return prepayOil;
	}

	public void setPrepayOil(BigDecimal prepayOil) {
		this.prepayOil = prepayOil;
	}

	public Integer getPrepayType() {
		return prepayType;
	}

	public void setPrepayType(Integer prepayType) {
		this.prepayType = prepayType;
	}

	public BigDecimal getPrepaySum() {
		return prepaySum;
	}

	public void setPrepaySum(BigDecimal prepaySum) {
		this.prepaySum = prepaySum;
	}

	public Date getGmtModify() {
		return gmtModify;
	}

	public void setGmtModify(Date gmtModify) {
		this.gmtModify = gmtModify;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Long getCreator() {
		return creator;
	}

	public void setCreator(Long creator) {
		this.creator = creator;
	}

	public Long getProprietor() {
		return proprietor;
	}

	public void setProprietor(Long proprietor) {
		this.proprietor = proprietor;
	}

	public String getCostId() {
		return costId;
	}

	public void setCostId(String costId) {
		this.costId = costId;
	}

	public BigDecimal getBalance() {
		return balance;
	}

	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}

	public BigDecimal getPertrolOilPrice() {
		return pertrolOilPrice;
	}

	public void setPertrolOilPrice(BigDecimal pertrolOilPrice) {
		this.pertrolOilPrice = pertrolOilPrice;
	}

	public Integer getPertrolOilStatus() {
		return pertrolOilStatus;
	}

	public void setPertrolOilStatus(Integer pertrolOilStatus) {
		this.pertrolOilStatus = pertrolOilStatus;
	}

	public Date getPertrolOilDate() {
		return pertrolOilDate;
	}

	public void setPertrolOilDate(Date pertrolOilDate) {
		this.pertrolOilDate = pertrolOilDate;
	}

	public Integer getPayState() {
		return payState;
	}

	public void setPayState(Integer payState) {
		this.payState = payState;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "PrepayBill{" +
				"id=" + id +
				", headId=" + headId +
				", orderCode='" + orderCode + '\'' +
				", orderDtlId=" + orderDtlId +
				", waybillId='" + waybillId + '\'' +
				", waybillDtlId='" + waybillDtlId + '\'' +
				", cusWaybill='" + cusWaybill + '\'' +
				", typeId=" + typeId +
				", typeName='" + typeName + '\'' +
				", transModel='" + transModel + '\'' +
				", vehicleTypeCode='" + vehicleTypeCode + '\'' +
				", vehicleTypeName='" + vehicleTypeName + '\'' +
				", fleetId=" + fleetId +
				", fleetName='" + fleetName + '\'' +
				", lspId=" + lspId +
				", lspName='" + lspName + '\'' +
				", vin='" + vin + '\'' +
				", driverId=" + driverId +
				", bankSerialNum='" + bankSerialNum + '\'' +
				", driverName='" + driverName + '\'' +
				", startAddr='" + startAddr + '\'' +
				", startAddrCode='" + startAddrCode + '\'' +
				", endAddr='" + endAddr + '\'' +
				", endAddrCode='" + endAddrCode + '\'' +
				", contractType='" + contractType + '\'' +
				", contractCode='" + contractCode + '\'' +
				", payerId=" + payerId +
				", payerName='" + payerName + '\'' +
				", payeeId=" + payeeId +
				", payeeName='" + payeeName + '\'' +
				", estPrice=" + estPrice +
				", actualPrice=" + actualPrice +
				", kilometre=" + kilometre +
				", num=" + num +
				", estAmt=" + estAmt +
				", actualAmt=" + actualAmt +
				", currentOilPrice=" + currentOilPrice +
				", currentEffectDate=" + currentEffectDate +
				", tenantId=" + tenantId +
				", orderDate=" + orderDate +
				", receiptDate=" + receiptDate +
				", loadStatus='" + loadStatus + '\'' +
				", status=" + status +
				", syncStatus='" + syncStatus + '\'' +
				", prepayCash=" + prepayCash +
				", prepayOil=" + prepayOil +
				", prepayType=" + prepayType +
				", prepaySum=" + prepaySum +
				", balance=" + balance +
				", pertrolOilPrice=" + pertrolOilPrice +
				", pertrolOilStatus=" + pertrolOilStatus +
				", gmtModify=" + gmtModify +
				", gmtCreate=" + gmtCreate +
				", creator=" + creator +
				", proprietor=" + proprietor +
				", costId=" + costId +
				", payState=" + payState +
				"} " + super.toString();
	}
}
